package work20241203_chap6oop.o_demo12;

/**
 * @author zdl
 * @date 2024/12/5
 */
public class Demo {
    public static void main(String[] args) {
        T t = new T();
        Shape circle  = t.getShape(0);
        double area = circle.area();
        System.out.println("圆形："+area);
        Shape rect  = t.getShape(1);
        double area1 = rect.area();
        System.out.println("长方形:"+area1);
        Shape square  = t.getShape(2);
        double area2 = square.area();
        System.out.println("正方形:"+area2);
    }
}
